<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div class="container">
	<ul class="breadcrumb" style="margin-bottom: 2px;height:20px;">
		<li><a href="home">Trang chủ</a> <span class="divider">/</span></li>
	</ul>
	<div class="menuleft">
		<div  class="my_menu" style="width:200px;">
        	<div class="header">Menu</div>
			<ul style="margin-top:0px;margin-bottom:2px;">
                <c:forEach var="menu" items="${requestScope.lMenu1 }">
					<li><a href="book.do?tpid=${ menu.topicId}&trang=1&slbooktt=${requestScope.soBookTrenTrang}&kieuSort=${requestScope.kieuSapXep}"><c:out value="${menu.topicName }"></c:out></a></li>	
				</c:forEach>	                  
            </ul>
		</div>	
			
	</div>
	<div class="main_content">
		<div style="width:100%; height:auto;float:left;">
			<div class="mycolor"><h3>Top sách mới nhất</h3></div>
				<c:forEach var="book" items="${lBookNew }">
				<div class="mybook ">
					<div id="image">
						<a href="ChiTietSach.do?bookid=${book.bookId }"><img class="img-rounded" alt="140x140" src="${book.imageUrl }"></a>	
					</div>
					<div id="content">
						<div id="name"><a title="${book.name }" href="ChiTietSach.do?bookid=${book.bookId }"><c:out value="${book.name }"></c:out></a></div>
					<table  class="table" style="text-transform:capitalize;">
					<tbody>
						<tr><td>Tác giả:</td><td><c:if test="${book.author.name != ''}"><a href="TacGia.do?save=false&tacgiaid=${book.author.authorId}&trang=1&slbooktt=${requestScope.soBookTrenTrang}&kieuSort=${requestScope.kieuSapXep}"><c:out value="${book.author.name }"></c:out></a></c:if>			</td></tr>
						<c:if test="${book.translator.name != ''}"><tr><td>Dịch giả : </td><td><a href="DichGia.do?save=false&dichgiaid=${book.translator.translatorId}&trang=1&slbooktt=${requestScope.soBookTrenTrang}&kieuSort=${requestScope.kieuSapXep}"><c:out value="${book.translator.name }"></c:out></a></td></tr></c:if>
						<tr><td>Nhà xuất bản: </td><td><c:if test="${book.publisher.name != ''}"><c:out value="${book.publisher.name }"></c:out></c:if></td></tr>
						<tr><td>Giá: </td><td><c:out value="${book.price }"></c:out> VND</td></tr>
						<tr><td>Ngày XB:</td><td><fmt:formatDate value="${book.publishDay }" pattern="dd/MM/yyyy"/></td></tr>
					</tbody>
				</table>
						
					</div>	
				</div>
			</c:forEach>
		</div>
		<br>
		<div style="width:100%; min-height:300px;height:auto;float:left;">
			<div class="mycolor"><h3>Sách có lượt view nhiều nhất</h3></div>
				<c:forEach var="book" items="${lBookTopView }">
								<div class="mybook ">
					<div id="image">
						<a href="ChiTietSach.do?bookid=${book.bookId }"><img class="img-rounded" alt="140x140" src="${book.imageUrl }"></a>	
					</div>
					<div id="content">
						<div id="name"><a title="${book.name }" href="ChiTietSach.do?bookid=${book.bookId }"><c:out value="${book.name }"></c:out></a></div>
					<table  class="table" style="text-transform:capitalize;">
					<tbody>
						<tr><td>Tác giả:</td><td><c:if test="${book.author.name != ''}"><a href=".do?save=false&tacgiaid=${book.author.authorId}&trang=1&slbooktt=${requestScope.soBookTrenTrang}&kieuSort=${requestScope.kieuSapXep}"><c:out value="${book.author.name }"></c:out></a></c:if>			</td></tr>
						<c:if test="${book.translator.name != ''}"><tr><td>Dịch giả : </td><td><a href="DichGia.do?save=false&dichgiaid=${book.translator.translatorId}&trang=1&slbooktt=${requestScope.soBookTrenTrang}&kieuSort=${requestScope.kieuSapXep}"><c:out value="${book.translator.name }"></c:out></a></td></tr></c:if>
						<tr><td>Nhà xuất bản: </td><td><c:if test="${book.publisher.name != ''}"><c:out value="${book.publisher.name }"></c:out></c:if></td></tr>
						<tr><td>Giá: </td><td><c:out value="${book.price }"></c:out> VND</td></tr>
						<tr><td>Ngày XB:</td><td><fmt:formatDate value="${book.publishDay }" pattern="dd/MM/yyyy"/></td></tr>
					</tbody>
				</table>
						
					</div>	
				</div>
			</c:forEach>
		</div>
	 </div>
</div>